import type { Component } from 'vue'
import { ElCascader, ElCheckboxGroup, ElColorPicker, ElDatePicker, ElInput, ElInputNumber, ElRadioGroup, ElRate, ElSelect, ElSelectV2, ElTreeSelect, ElSlider, ElSwitch, ElTimePicker, ElTimeSelect, ElTransfer, ElAutocomplete, ElDivider } from 'element-plus'
import { Tinymce } from '@/components/Editor/Tinymce'
import { InputPassword } from '@/components/FormItem/InputPassword'
import { UploadImage, UploadImages, UploadFile } from '@/components/Upload'
import type { ComponentName } from '@/types/components'

const componentMap: Recordable<Component, ComponentName> = {
  Radio: ElRadioGroup,
  Checkbox: ElCheckboxGroup,
  CheckboxButton: ElCheckboxGroup,
  Input: ElInput,
  Autocomplete: ElAutocomplete,
  InputNumber: ElInputNumber,
  Select: ElSelect,
  Cascader: ElCascader,
  Switch: ElSwitch,
  Slider: ElSlider,
  TimePicker: ElTimePicker,
  DatePicker: ElDatePicker,
  Rate: ElRate,
  ColorPicker: ElColorPicker,
  Transfer: ElTransfer,
  Divider: ElDivider,
  TimeSelect: ElTimeSelect,
  SelectV2: ElSelectV2,
  TreeSelect: ElTreeSelect,
  RadioButton: ElRadioGroup,
  InputPassword,
  Tinymce,
  UploadImage,
  UploadImages,
  UploadFile
}

export { componentMap }
